package practice;

import java.util.List;
import java.util.Scanner;

public class practice012 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);

		try {

		} finally {
			scanner.close();
		}
	}
	/**
	 * n 章节数
	 * t 距离考试时间
	 * tm 每章的学习时间
	 * 
	 * @param n
	 * @param t
	 * @param tm
	 */
	public static void auditRush(int n, int t, List<Integer> tm) {
		int maxN = 0;
		int tTemp = 0;
		int tmTemp;
		
		for (int i = 0; i < tm.size(); i++) {
			tmTemp = tm.get(i);
			if (t < tmTemp) {
				continue;
			}
			
			tTemp = tTemp + tmTemp;
			if (tTemp >= t) {
				break;
			}
			
			maxN = maxN++;
		}

		System.out.println(maxN);
	}
}
